﻿using Hotel.BLL;
using Hotel.DAL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Hotel.API.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class AdminController : ControllerBase
    {
        public AdminController(AdminBLL adminBLL)
        {
            AdminBLL = adminBLL;
        }
        public AdminBLL AdminBLL { get; }
        [HttpGet("Login")]
        public dynamic Login(string useName, string usePwd)
        {
            try
            {
                //判断用户名是否存在
                return AdminBLL.Login(useName, usePwd);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
